package com.ptmall.app.net.api;





import com.ptmall.app.net.base.ApiBaseData;
import com.ptmall.app.net.base.Result;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by Administrator on 2017/4/22.
 * 云链相关接口
 */

public interface ApiService {


    /**
     * 执行服务器的get请求
     *
     * @param url 请求的地址
     * @return
     */
    @FormUrlEncoded
    @POST()
    Observable<ApiBaseData> executePost(@Url String url, @FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @GET()
    Observable<Object> wxgetinfo(@Url String url);


    @Streaming
    @GET
    Call<ResponseBody> downloadFile(@Url String fileUrl);

    @Multipart
    @POST("User/headChange")
    Observable<Result<String>> uploadFileWithRequestBody(@PartMap Map<String, RequestBody> params);
    @Multipart
    @POST("User/uploadImage")
    Observable<Result<String>> uploadFile(
                                          @Part MultipartBody.Part file);
    @Multipart
    @POST("User/uploadImage")
    Observable<Result<String>> alter(@PartMap Map<String, RequestBody> params);

    /* ###################################各接口###################################################### */

    //注册
    String REGITSER = "Login/regist";
    //首页小区列表
    String HOMEPAGEAREALIST = "Index/xiaoquList";
    //登录
    String LOGIN = "Login/passLogin";
    //首页
    String HOMEPAGEINDEX = "Index/index";
    //钱包明细
    String WALLETRECHARGELIST = "User/cashlist";
    //个人资料
    String MEINFO = "User/index";
    //钱包充值
    String WALLETRECHARGE = "User/addRecharge";
    //消息列表
    String MESSAGELIST = "User/noticeList";
    //消息链接
    String MESSAGEURL = "Detail/noticeinfo";
    //收藏列表
    String COLLECTIONList = "User/productCollect";
    //地址列表
    String ADDRESSLIST = "User/addressList";
    //新增地址
    String ADDADDRESS = "User/addaddress";
    //编辑地址
    String EDITADDRESS = "User/saveaddress";
    //删除地址
    String DELADDRESS = "User/deladdress";
    //供应商申请
    String APPLYSHOP = "User/addApply";
    //获取一级分类
    String GETCATELIST  = "Index/styleList";
    //订单列表
    String ORDERLIST = "orders/getList";
    //购物车列表
    String SHOPCARLIST = "Index/cartList";
    //订单详情
    String ORDERDETIL = "User/orderInfo";
    //重置密码
    String RESETPASS = "Login/reset";
    //快速登陆
    String SEEDLOGIN = "Login/telLogin";
    //购物车加减
    String SHOPCARADDM = "Index/changeCart";
    //删除购物车
    String DELSHOPCARGOOD = "Index/delCart";
    //加入购物车
    String GOODADDCAR = "Index/addCart";
    //通过分类id获取商品列表
    String GOODLISt = "Index/productList";
    //提交订单
    String CONFRIMORDER = "Index/addOrder";
    //商品
    String GOODDETIL = "Index/xiangqing";
    //通过一级分类id获取二级分类id
    String GETSTYLE2 = "Index/getEr";
    //取消订单
    String ORDERCANCEL = "User/quxiao";
    //删除订单
    String ORDERDEL = "User/deleteOrder";
    String ORDERQXTK = "User/canceltui";
    //添加收藏
    String ADDCOLLECTION = "Index/addCollect";
    //删除收藏
    String DELCOLLECTION = "Index/delCollect";
    //确认收获
    String ENTERORDER = "User/shouhuo";
    //秒杀商品
    String MIAOSHALIST = "Index/miaosha";
    //购物券列表
    String COUPONLIST = "User/myquan";
    //修改昵称
    String NICKNAMEEDIT = "User/nameChange";
    //通过订单支付
    String ORDERIDPAY = "User/orderpay";
    //专题页面
    String ZTDATA = "Index/zhuaninfo";
    //物流消息
    String ORDERNOTICE = "User/orderNotice";
    String GETFYWAIT = "member/commission_wait";
    String GETFYLIST = "member/commission_list";
    String FFYJPUT = "member/commission";
    //退款申请
    String TUIKUANSHENQING = "User/tuikuan";
    //退款详情
    String TKDETIL = "User/orderTuiInfo";
    //微信登录
    String WXLOGIN =  "Login/weiLogin";
    //微信绑定手机号
    String WXBDLOGIN = "Login/weiTel";
    //邀请有礼
    String MYSPEAD = "User/myspread";
    //优惠券列表
    String QUANLIST = "User/quan";
    //领取券
    String  GETQUAN = "User/addquan";
    //更多小区
    String MOREXIAOQU = "Index/xiaoquMore";
    //搜索商品
    String SEACHGOOD = "Index/productSearch";
    //
    String SHOPSETTING = "User/set";

    String COUDAN = "Index/productcou";
    String SETTINGPAYPASS = "User/paypassChange";
    String CONFIRMDETIL = "Index/tijiaohtml";
    String SEACHLIST ="Index/productSearch";
    String GGDETIL = "Login/guanggao";
    String STARTIMG = "public/start";
    String CNXH = "Index/likeList";

    /**
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     * */


    String XFLOGIN = "member/login";

    String MYINFO = "member/getinfo";

    String SETINFO = "member/modinfo";

    String REPASS = "member/modpass";

    String FK = "public/suggest";

    String QBLIST = "finance/getList";

    String ADDBANK = "bank/add";

    String BANKLIST = "bank/getList";
    String BANKLIST2 = "bank/support";

    String DELBANK = "bank/delInfo";

    String TX = "withdraw/add";

    String KCLIST = "stock/getGoods";
    String SJXJ = "goods/status";
    String LBLIST = "slides/getList";

    String MZGETSET = "gift/getSet";

    String GETYF = "postage/getList";

    String TEAMLIST = "team/getList";

    String SJLIST = "apply/getList";

    String SHXQ = "apply/getInfo";

    String CLSJ = "apply/status";

    String TXWL = "orders/deliver";

    String SXJ = "goods/status";

    String GG = "stock/getStock";
    String SETGG = "stock/setStock";

    String ADDLB = "slides/add";

    String DELLB = "slides/delInfo";

    String GETHD = "store/getInfo";

    String SETHD = "store/add";

    String YHQLIST = "coupon/getList";

    String ADDYHQ = "coupon/add";

    String ADDMS = "seckill/add";

    String YHQNUM = "coupon/addNum";

    String DELYHQ = "coupon/delInfo";

    String MSLIST = "seckill/getInfo";

    String GETMZ = "gift/getSet";

    String GETZPLIST = "gift/getList";

    String MZSET = "gift/set";

    String YFSET = "postage/add";

    String XFORDER = "orders/getInfo";

    String CKWL = "orders/express";

    String GOODLIST = "goods/getList";

    String GOODDETILS = "goods/detail";

    String CARADD = "cart/add";

    String SJ  = "member/apply";

    String CLIST = "cart/getList";

    String JIAN = "cart/reduce";

    String SHZT = "apply/getStatus";

    String ADDRESS = "address/getList";
    String ADDRESSDETIL = "address/getInfo";

    String TJ = "orders/add";

    String SUBHT =  "orders/pushContract";

    String HTLIST = "orders/contract";

    String GETXS = "orders/charts";

    String GETFX = "orders/analysis";

    String UPGOOD = "orders/offline";



}
